<include file="Public:js" /> 
<script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>
<div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">防伪码操作</span></div>
        </div>
        
        <div class="result-wrap">
            <form action="{:U('Securityqr/do_fweimacz')}" method="post" id="myform" name="myform">
            <!-- 店铺ID -->
                <input type="hidden" name="supplier_id" value="{$supplier_id}">
                <div class="config-items">
                    <div class="config-title">
                        <h1><i class="icon-font">&#xe00a;</i>防伪码操作</h1>
                    </div>
                    <div class="result-content">
                        <table width="100%" class="insert-tab">
                            <tbody>
                            <tr>
                                 <th width="15%"><i class="require-red">*</i>原入驻商ID：</th>           
                               <td>
                                    <input type="text"  datatype="*" nullmsg="原入驻商ID" errormsg="请添加原入驻商ID"    name="y_security" class="common-text"> 
                               </td>
                                 
                            </tr>
                             <tr>
                                 <th width="15%"><i class="require-red">*</i>现入驻商ID</th>
                               <td>
                                    <input type="text"     name="x_security" class="common-text"> 
                               </td>
                                 
                            </tr>
                            
                            <tr>
                                 <th width="15%"><i class="require-red">*</i>原商品ID：</th>
                                
                               <td>
                                    <input type="text" datatype="*" nullmsg="请添加原商品ID" name="y_goodsid" class="common-text"> 
                               </td>
                                 
                            </tr>
                             <tr>
                                 <th width="15%"><i class="require-red">*</i>现商品ID：</th>
                                
                               <td>
                                    <input type="text"  datatype="*" nullmsg="请添加现商品ID" name="x_goodsid" class="common-text"> 
                               </td>
                                 
                            </tr>
                            <tr>
                                 <th width="15%"><i class="require-red">*</i>防伪码开始ID：</th>
                               <td>
                                    <input type="text" datatype='n' errormsg="请添加防伪码开始ID"   name="start_qrid" class="common-text"> 
                               </td>
                                 
                            </tr>
                            <tr>
                                 <th width="15%"><i class="require-red">*</i>防伪码结束ID：</th>
                               <td>
                                    <input type="text" datatype='n'  errormsg="请添加防伪码结束ID"   name="end_qrid" class="common-text"> 
                               </td>
                                 
                            </tr>
                                <tr>
                                    <th></th>
                                    <td>
                                      
                                        <input  type="button" value="提交" id="butan" class="btn btn-primary btn6 mr10">
                                        <input type="button" value="返回" onclick="history.go(-1)" class="btn btn6">
                                    </td>
                                </tr>
                            </tbody></table>
                    </div>
                </div>
                </form>
                
        </div>
    </div>



<script type="text/javascript">
$('#butan').click(function(){  //自动按千拆分
	layer.confirm('确定要移动防伪码吗？', {
        btn: ['确定','取消'], //按钮
        shade: false //不显示遮罩
      }, function(){
		  
		  var y_security = $('input[name="y_security"]').val();
		  var x_security = $('input[name="x_security"]').val();
		  var y_goodsid = $('input[name="y_goodsid"]').val();
		  var x_goodsid = $('input[name="x_goodsid"]').val();
		  var start_qrid = $('input[name="start_qrid"]').val();
		  var end_qrid = $('input[name="end_qrid"]').val();
		  
		  
        $.post("{:U('Securityqr/do_fweimacz')}", {y_security:y_security,x_security:x_security,y_goodsid:y_goodsid,x_goodsid:x_goodsid,start_qrid:start_qrid,end_qrid:end_qrid}, function(res)  {
          if(res.state == 1) {
            layer.msg(res.message, {icon: 1, time: 1000});
          } else {
            layer.msg(res.message, {icon: 2, time: 1000});
          }
          
        });
      }, function(){
        layer.msg('取消了操作！', {time: 1000});
      });
	});	

</script>